const cloud = require('wx-server-sdk')

cloud.init({
    env: 'everyday-4gkd6una188bf952'
})
const db = cloud.database()

module.exports = async function (id) {
    const musicResult = await db.collection('music').where(id ? {
        _id: id
    } : {}).get()
    return musicResult.data
}